import React from 'react';
import style from './myTable.less'

class MyTable extends React.Component {


    render() {
        let dataValue = this.props.dataValue;
        return (
            <div>
                <div className={style.tableTitle}>
                    {
                        dataValue&&dataValue.title.map((index,key)=>{
                            return(<span key={String(key)}>{index}</span>)
                        })
                    }
                </div>
                {
                    dataValue&&dataValue.data.map((index,key)=>{
                        return(
                            <div key={String(key)}>
                                <div className={style.tableBody}>
                                    <span>{index.name}</span>
                                    <span>{index.span1}</span>
                                    <span>{index.span2}</span>
                                </div>
                                <div className={style.line}></div>
                            </div>
                        )
                    })
                }
            </div>
        )
    }
}
export default MyTable;
